package com.autologistics.service;

import com.autologistics.dao.FororderidDao;

public class FororderidServiceImpl implements FororderidService{
	FororderidDao fororderidDao;

	public FororderidDao getFororderidDao() {
		return fororderidDao;
	}

	public void setFororderidDao(FororderidDao fororderidDao) {
		this.fororderidDao = fororderidDao;
	}
	public String getNewOrderId(){
		String s="0000000000";
		int i = fororderidDao.getNewOrderId();
		char [] c=s.toCharArray();
		int wei=9;
		int remain=0;
		while (i!=0){
			remain=i % 10;
			i=i/10;
			c[wei]=(char) (remain+(int)'0');
			wei--;
		}
		s= new String(c);
		return s;
	}
	/*public static void main(String[] args) {
		System.out.println(new FororderidServiceImpl().getNewOrderId());
	}*/
}
